package com.hissy.common.design.create.builder;

/**
 * Created by zhangyanfei on 2019/4/4.
 *
 * @author zhangyanfei
 * @date 2019/04/04
 */
public class EasyPersonBuilder {

    private String body;

    private String head;

    private String foot;

    public EasyPersonBuilder() {

    }

    public EasyPersonBuilder buildFoot(String foot) {
        this.foot = foot;
        return this;
    }

    public EasyPersonBuilder buildBody(String body) {
        this.body = body;
        return this;
    }

    public EasyPersonBuilder buildHead(String head) {
        this.head = head;
        return this;
    }

    public AbstractPerson createPerson() {
        AbstractPerson abstractPerson = new AbstractPerson();
        abstractPerson.setFoot(this.foot);
        abstractPerson.setBody(this.body);
        abstractPerson.setHead(this.head);
        return abstractPerson;
    }
}
